// File GenericPersonStates.h
//
// Purpose: Contains the states for the generic person AI
//
// Author : Bryson King (edited)
// Original Code Provided by: Mat Buckland 2002 (fup@ai-junkie.com)
// Date : 21 March 2013
// --------------------------------------------------------------
#ifndef GENERICPERSONSTATES_H
#define GENERICPERSONSTATES_H

#define DEBUG_SECTION


#include "AbstractState.h"

class CGenericPerson;
struct Telegram;

//------------------------------------------------------------------------
//	This state is what the generic person goes into once attacked by the
//	player.
//------------------------------------------------------------------------
class AttackPlayer : public CState<CGenericPerson>
{
private:  
	AttackPlayer(){}

	//copy ctor and assignment should be private
	AttackPlayer(const AttackPlayer&);
	AttackPlayer& operator=(const AttackPlayer&);
 
public:
	//this is a singleton
	static AttackPlayer* Instance();

	virtual void Enter(CGenericPerson* person);

	virtual void Execute(CGenericPerson* person);

	virtual void Exit(CGenericPerson* person);

	virtual bool OnMessage(CGenericPerson* agent, const Telegram& msg);
};

//------------------------------------------------------------------------
//	This is the default state for the generic person and is reentered
//	if the player decides to stop attacking.
//------------------------------------------------------------------------
class Standby : public CState<CGenericPerson>
{
private:
	Standby(){}

	//copy ctor and assignment should be private
	Standby(const Standby&);
	Standby& operator=(const Standby&);
 
public:
	//this is a singleton
	static Standby* Instance();

	virtual void Enter(CGenericPerson* person);

	virtual void Execute(CGenericPerson* person);

	virtual void Exit(CGenericPerson* person);

	virtual bool OnMessage(CGenericPerson* agent, const Telegram& msg);
};

//------------------------------------------------------------------------
//	This is the state the generic person enters once he/she is killed.
//	From this state the player can inspect the body to see what items
//	can be obtained.
//------------------------------------------------------------------------
class DeadGenericPlayer : public CState<CGenericPerson>
{
private:
	DeadGenericPlayer(){}

	//copy ctor and assignment should be private
	DeadGenericPlayer(const DeadGenericPlayer&);
	DeadGenericPlayer& operator=(const DeadGenericPlayer&);
 
public:
	//this is a singleton
	static DeadGenericPlayer* Instance();

	virtual void Enter(CGenericPerson* person);

	virtual void Execute(CGenericPerson* person);

	virtual void Exit(CGenericPerson* person);

	virtual bool OnMessage(CGenericPerson* agent, const Telegram& msg);
};

#endif